import request from '../utils/http'

// 加入购物车
export const reqAddToCart = ({ goodsId, count, ...data }) => {
  return request.get(`/cart/addToCart/${goodsId}/${count}`, data, { isLoading: false })
}
// 列表
export const reqCartList = () => request.get('/cart/getCartList')
// 商品勾选状态
export const reqGoodChecked = (goodsId, isChecked) => request.get(`/cart/checkCart/${goodsId}/${isChecked}`, {}, { isLoading: false })
// 全选/全不选
export const reqIsAllChecked = (isChecked) => request.get(`/cart/checkAllCart/${isChecked}`, {}, { isLoading: false })
// 删除
export const reqDelGoods = (goodsId) => request.get(`/cart/delete/${goodsId}`)
